package com.mycom.service.impl;

import com.mycom.dao.SubmitItemDao;
import com.mycom.dao.TeamSubmitItemDao;
import com.mycom.pojo.SubmitItem;
import com.mycom.pojo.TeamSubmitItem;
import com.mycom.service.SubmitItemService;
import com.mycom.service.TeamSubmitItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeamSubmitItemServiceImpl implements TeamSubmitItemService {
    @Autowired
    private TeamSubmitItemDao teamSubmitItemDao;

    @Override
    public boolean save(TeamSubmitItem teamSubmitItem) {
        return teamSubmitItemDao.save(teamSubmitItem) > 0 ? true : false;
    }

    @Override
    public List<TeamSubmitItem> findByFormId(Integer formId) {
        return teamSubmitItemDao.findByFormId(formId);
    }
}
